
<div class="row" >
  <div class="col-sm-10 col-sm-push-1">
      <form class="form form-horizontal"  [formGroup]="userForm">
          <div class="one-form-header"></div>
          <div class="one-form-body">
              <div class="row">
                  <div class="col-lg-3 col-md-4">
                      <!-- -->
                    <label style="width: 100%;font-weight: normal;">区域：
                      <input type="text" class="form-control" id="serach_regionName"  value="" placeholder="按Enter键搜索"  (change)="enterSearch()">
                    </label>
                      <div id="user_update_orgTree" class="ztree one-ztree-search" style="height: 291px;max-height: 291px;"> </div>
                  </div>
                  <div class="col-lg-2 col-md-4">
                      <div class="one-ztree-type">组织机构</div>
                      <div id="user_update_entAndGovTree" class="ztree" style="max-height: 300px;">
                      </div>
                  </div>
                  <div class="col-lg-2 col-md-4">
                      <div class="one-ztree-type">部门</div>
                      <div id="user_update_deptTree" class="ztree" style="max-height: 300px;"> </div>
                  </div>
                  <div class="col-lg-5 col-md-8 col-lg-push-0 col-md-push-2">

                      <div class="form-group">
                          <label for="user_add_regionName" class="col-xs-3 control-label">行政区划:</label>
                          <div class="col-xs-9">
                              <input type="hidden" class="form-control" id="user_add_regionId" formControlName="regionId"  >
                              <input type="text" class="form-control" id="user_add_regionName" formControlName="regionName"  readonly>
                          </div>
                      </div>

                      <div class="form-group">
                          <label for="user_update_orgName" class="col-xs-3 control-label">组织机构:</label>
                          <div class="col-xs-9">
                              <input type="hidden" class="form-control" id="user_update_orgId" formControlName="orgId"  >
                              <input type="text" class="form-control" id="user_update_orgName" formControlName="orgName"  readonly >
                          </div>
                      </div>

                      <div class="form-group">
                          <label for="user_update_depName" class="col-xs-3 control-label">部门:</label>
                          <div class="col-xs-9">
                              <input type="hidden" class="form-control" id="user_update_depId" formControlName="depId"  >
                              <input type="text" class="form-control" id="user_update_depName" formControlName="depName"  readonly >
                          </div>
                      </div>
                      <div class="form-group">
                          <label for="name" class="col-xs-3 control-label"><span style="color: red;">*</span> 用户名称:</label>
                          <div class="col-xs-9">
                              <input type="hidden" id="userId" formControlName="userId" name="userId">
                              <input type="text" class="form-control" id="name" formControlName="name" required>
                              <div *ngIf="formErrors.name" class="has-error">
                                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.name}} </label>
                              </div>
                          </div>
                      </div>

                      <div class="form-group">
                          <label for="user_add_phone" class="col-xs-3 control-label">联系电话:</label>
                          <div class="col-xs-9">
                              <input type="text" class="form-control" id="user_add_phone" formControlName="phone" maxlength="14" >
                              <div *ngIf="formErrors.phone" class="has-error">
                                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.phone}} </label>
                              </div>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-xs-3 control-label">用户职务:</label>
                          <div class="col-xs-9">
                              <input type="text" class="form-control" id="duty" formControlName="duty" >
                          </div>
                      </div>
                      <div class="form-group">
                          <label for="customer_add_duty" class="col-xs-3 control-label" ><span style="color: red;">*</span> 用户类型:</label>
                          <div class="col-xs-9">
                              <!-- 下拉框 -->
                            <select class="multiselect form-control" id="customer_add_duty" formControlName="type" required>
                              <!--<option *ngFor="let state of states" [value]="state">{{state}}</option>-->
                              <option value="0" *ngIf="userType == '0' || userType == '00'">管理员</option>
                              <option value="1" *ngIf="userType == '1' || userType == '00'">企业用户</option>
                              <option value="2" *ngIf="userType == '2' || userType == '00'">政府用户</option>
                              <option value="3" *ngIf="userType == '3' || userType == '00'">运维</option>
                              <option value="4" *ngIf="userType == '4' || userType == '00'">演示</option>
                              <option value="5" *ngIf="userType == '5' || userType == '00'">第三方</option>
                              <option value="6" *ngIf="userType == '6' || userType == '00'">公众</option>
                            </select>
                          </div>
                      </div>

                  </div>
              </div>
          </div>
          <div class="one-form-footer">
              <div class="pull-right">
                  <button class="btn btn-default" type="button" (click)="cancelcustomerUpdate()">取消</button>
                  <button class="btn btn-success" type="button"  [disabled]="userForm.invalid" (click)="updataUserInfo()">保存</button>
              </div>
          </div>
      </form>
  </div>
</div>
